﻿/********************************************************************************************************************
* Author:	Christos Polydorou																						*
* Email:	std04237@di.uoa.gr																						*
* Purpose:	This script is used in order to create the stored procedure "usp_registeruser" that adds a user to the *
*			users table.																							*
********************************************************************************************************************/

CREATE PROCEDURE [dbo].[usp_registeruser]
	@username nvarchar(50),
	@password nvarchar(50),
	@email nvarchar(50),
	@fname nvarchar(50),
	@lname nvarchar(50)
AS
	INSERT INTO Users
	VALUES(@username,@password,@email,'std','0',CURRENT_TIMESTAMP,'0',CURRENT_TIMESTAMP,CURRENT_TIMESTAMP,@fname,@lname)
RETURN 0